package com.gitee.lougnib.simplekits.common_faces.web.event;

public class EventResponseKit {

	public static final EventResponseDto DEFAULT_SUCCESS;

	static {
		DEFAULT_SUCCESS = new EventResponseDto();
		DEFAULT_SUCCESS.setCd(EventResponseConsts.SUCCESS);
	}

	public static EventResponseDto success() {
		return DEFAULT_SUCCESS;
	}

	public static EventResponseDto success(Object data) {
		EventResponseDto resp = new EventResponseDto();
		resp.setCd(EventResponseConsts.SUCCESS);
		resp.setData(data);
		return resp;
	}

	public static EventResponseDto success(Object data, String msg, String... args) {
		EventResponseDto resp = new EventResponseDto();
		resp.setCd(EventResponseConsts.SUCCESS);
		return resp;
	}

	public static EventResponseDto error() {
		EventResponseDto resp = new EventResponseDto();
		resp.setCd(EventResponseConsts.ERROR);
		return resp;
	}

	public static EventResponseDto error(String msg, String... args) {
		EventResponseDto resp = new EventResponseDto();
		resp.setCd(EventResponseConsts.SUCCESS);
		return resp;
	}
}
